package com.ke.jun.view.widght

import android.content.Context
import android.graphics.Canvas
import android.graphics.Color
import android.graphics.Paint
import android.util.AttributeSet
import android.view.View

class ShaderView@JvmOverloads
constructor(context: Context, attributeSet: AttributeSet?=null, defStyleAttr:Int=0): View(context,attributeSet,defStyleAttr) {
    private val paint=Paint()

    init {
        with(paint){
            strokeWidth=10f
            style=Paint.Style.FILL
            isAntiAlias=true
            color=Color.RED
        }

    }

    override fun onDraw(canvas: Canvas) {
        canvas.drawCircle(200f,200f,150f,paint)
        paint.color=Color.BLACK
        canvas.drawCircle(200f,200f,110f,paint)


    }
}